import com.jt.controller.UserController;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testspring {
    @Test
    public void test(){
        ApplicationContext context=
                new ClassPathXmlApplicationContext("application_annocation.xml");
        UserController userController = (UserController) context.getBean("userController");
        userController.addUser();
        System.out.println("终于学会了MVC结构");
    }
    @Test
    public void testGetController(){
        ApplicationContext context=
                new ClassPathXmlApplicationContext("application_annocation.xml");
        UserController userController = (UserController) context.getBean("userController");
        System.out.println(userController);
    }
}
